var express = require('express');
var router = express.Router();
var sqlModel = require('../lib/sql');

// 查询学生列表
router.get('/studentList', async(req, res, next) => {
    await sqlModel.findStuList()
        .then(result => {
            // user = result[0];
            console.log(result)
            var response = { status: 200, data: result };
            res.send(response);
        }).catch((err)=>{
            console.log(err);
            res.send(err);
        })
})

module.exports = router;